/*******************************************************************************
 * Copyright (c) 2011 GigaSpaces Technologies Ltd. All rights reserved
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.cloudlead.common.worker.client;


/*********************
 * A shared location for all constants used by multiple cloudify constants.
 *
 * @author barakme
 *
 */
public final class Constants {


    /*******************
     * HTTP status codes
     */
    public static final int HTTP_STATUS_CODE_OK = 200;
    public static final int HTTP_STATUS_INTERNAL_SERVER_ERROR = 500;
    public static final int HTTP_STATUS_NOT_FOUND = 404;
    public static final int HTTP_STATUS_ACCESS_DENIED = 403;
    public static final int HTTP_STATUS_UNAUTHORIZED = 401;


    /*******************
     *
     */
    public static final String NEW_LINE = System.getProperty("line.separator");
    public static final String TAB_CHAR = "\t";
   
   
    /**
     * Http timeouts
     */
    public static final int DEFAULT_HTTP_CONNECTION_TIMEOUT = 20 * 1000; // one minute
    public static final int DEFAULT_HTTP_READ_TIMEOUT = 20 * 1000; // two minutes per request

    /**
     * Http connections
     */
    public static final int DEFAULT_MAX_PER_ROUTE = 20;
    public static final int MAX_TOTAL = 200;

    
    /*******
     *  Upload file constants.
     */
    // load from property, default to tempdir
    public static final String UPLOAD_FILE_PARAM_NAME = "file";
    public static final String UPLOADS_FOLDER_NAME = "restUploads";
    public static final int DEFAULT_UPLOAD_TIMEOUT_MILLIS = 5 * 60 * 1000;
    public static final int DEFAULT_UPLOAD_SIZE_LIMIT_BYTES = 100 * 1000 * 1000;

  	
	/*****
	 * Useful json mime type constant.
	 */
	public static final String MIME_TYPE_APPLICATION_JSON = "application/json";
	
	/**
	 * dump file
	 */
	public static final long DEFAULT_DUMP_FILE_SIZE_LIMIT = 10 * 1024 * 1024;

}

